package ch03;

class OperatorEx27 { 
      public static void main(String[] args) { 
            int x =  10; 
            int y = -10; 

            int absX = (x >= 0) ? x : -x; 
            int absY = (y >= 0) ? y : -y; 

            System.out.println("x= 10 is, absolute x is "+absX); 
            System.out.println("y=-10 is, absolute y is "+absY); 
      } 
}
/*
x= 10 is, absolute x is 10
y=-10 is, absolute y is 10
*/